import http from "@/http";
//失物招领数据类型
export type Lost = {
    lostId:string;
    title:string;
    titleDesc:string;
    content:string;
    type:string;
    image:string;
    status:string;
}
//列表参数类型
export type ListParm = {
    currentPage:number,
    pageSize:number,
    title:string,
    type:string
}
export type LostClaim = {
    lostId:string;
    person:string;
    phone:string;
}
//新增
export const addApi = (parm:Lost)=>{
    return http.post("/api/sysLost",parm)
}
//列表
export const getListApi = (parm:ListParm)=>{
    return http.get("/api/sysLost/list",parm)
}
//编辑
export const editApi = (parm:Lost)=>{
    return http.put("/api/sysLost",parm)
}
//删除
export const deleteApi = (lostId:string)=>{
    return http.delete(`/api/sysLost/${lostId}`)
}
//认领
export const claimApi = (parm:LostClaim)=>{
    return http.post("/api/sysLost/claim",parm)
}
